package es.udc.emarketapp.emarket.model.usersFacade;

import es.udc.emarketapp.emarket.model.client.vo.ClientVO;
import es.udc.emarketapp.emarket.model.seller.vo.SellerVO;
import es.udc.emarketapp.emarket.model.usersFacade.exceptions.IncorrectPasswordException;
import es.udc.emarketapp.emarket.model.usersFacade.vo.LoginResultVO;
import es.udc.emarketapp.emarket.util.exceptions.model.NifCifAlreadyExistsException;
import es.udc.emarketapp.emarket.util.exceptions.model.UserNameAlreadyExistsException;
import es.udc.fbellas.j2ee.util.exceptions.InstanceNotFoundException;

import es.udc.fbellas.j2ee.util.exceptions.InternalErrorException;
import java.io.Serializable;


public interface UsersFacadeInterface extends Serializable{


    public LoginResultVO login(String loginName, String password,
            boolean passwordIsEncrypted, boolean isAdmin)
            throws InstanceNotFoundException, IncorrectPasswordException,
            InternalErrorException;

    public void changePassword(String idUser, String oldPass, String newPass)
            throws IncorrectPasswordException, InternalErrorException;

    public ClientVO createClient(ClientVO clientVO)
            throws NifCifAlreadyExistsException,
            UserNameAlreadyExistsException, InternalErrorException;

    public ClientVO findClientById(String idClient)
            throws InstanceNotFoundException, InternalErrorException;

    public ClientVO modifyClient(ClientVO clientVO)
            throws InternalErrorException, InstanceNotFoundException;

    public SellerVO createSeller(SellerVO sellerVO)
            throws NifCifAlreadyExistsException,
            UserNameAlreadyExistsException, InternalErrorException;

    public SellerVO findSellerById(String idSeller)
            throws InternalErrorException, InstanceNotFoundException;


} // class

